How can I redirect the contents of a file to the pastebinit command? [duplicate]

Posted by Tim on Ask Ubuntu See other posts from Ask Ubuntu or by Tim
Published on 2014-08-22T08:47:55Z Indexed on 2014/08/22 10:27 UTC
Read the original article Hit count: 156

Filed under:
|
|

This question already has an answer here:

Whenever I was to store something to show someone here, I run

command-with-output | pastebinit.

That returns the link to the paste online. For example:

echo timtjtim | pastebinit

gave me the link

paste.ubuntu.com/8010000

Which I can share. How can I do this with a file - for example a log file. Surely I don't have to open - > copy all - > open paste.ubuntu.com -> paste it?

© Ask Ubuntu or respective owner

Related posts about command-line

Related posts about redirect